#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "lib/foo.h"

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
    char *d = (char *)malloc(Size + 1);
    memcpy(d, Data, Size);
    d[Size] = 0;

    foo(d);

    free(d);
    return 0;
}